package com.zr.lads.pojo;
// Generated 2016-10-26 11:45:42 by Hibernate Tools 4.0.0.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Uorder generated by hbm2java
 */
@Entity
@Table(name = "uorder", catalog = "lads")
public class Uorder implements java.io.Serializable {

	private Integer orderId;
	private User user;
	private String orderNo;
	private String orderReceiverName;
	private String orderReceiverPhone;
	private String orderReceiverAddr;
	private String orderProviderName;
	private String orderProviderPhone;
	private String orderProviderAddr;
	private String orderCreateDate;
	private String orderState;
	private Double goodsWeight;
	private String orderNote;
	private Double orderFreight;
	private Set<Schedule> schedules = new HashSet<Schedule>(0);

	public Uorder() {
	}

	public Uorder(User user, String orderNo, String orderReceiverName, String orderReceiverPhone,
			String orderReceiverAddr, String orderProviderName, String orderProviderPhone, String orderProviderAddr,
			String orderCreateDate, String orderState, Double goodsWeight, String orderNote, Double orderFreight,
			Set schedules) {
		this.user = user;
		this.orderNo = orderNo;
		this.orderReceiverName = orderReceiverName;
		this.orderReceiverPhone = orderReceiverPhone;
		this.orderReceiverAddr = orderReceiverAddr;
		this.orderProviderName = orderProviderName;
		this.orderProviderPhone = orderProviderPhone;
		this.orderProviderAddr = orderProviderAddr;
		this.orderCreateDate = orderCreateDate;
		this.orderState = orderState;
		this.goodsWeight = goodsWeight;
		this.orderNote = orderNote;
		this.orderFreight = orderFreight;
		this.schedules = schedules;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "order_id", unique = true, nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "u_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "order_no", length = 16)
	public String getOrderNo() {
		return this.orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	@Column(name = "order_receiverName", length = 16)
	public String getOrderReceiverName() {
		return this.orderReceiverName;
	}

	public void setOrderReceiverName(String orderReceiverName) {
		this.orderReceiverName = orderReceiverName;
	}

	@Column(name = "order_receiverPhone", length = 16)
	public String getOrderReceiverPhone() {
		return this.orderReceiverPhone;
	}

	public void setOrderReceiverPhone(String orderReceiverPhone) {
		this.orderReceiverPhone = orderReceiverPhone;
	}

	@Column(name = "order_receiverAddr")
	public String getOrderReceiverAddr() {
		return this.orderReceiverAddr;
	}

	public void setOrderReceiverAddr(String orderReceiverAddr) {
		this.orderReceiverAddr = orderReceiverAddr;
	}

	@Column(name = "order_providerName", length = 16)
	public String getOrderProviderName() {
		return this.orderProviderName;
	}

	public void setOrderProviderName(String orderProviderName) {
		this.orderProviderName = orderProviderName;
	}

	@Column(name = "order_providerPhone", length = 16)
	public String getOrderProviderPhone() {
		return this.orderProviderPhone;
	}

	public void setOrderProviderPhone(String orderProviderPhone) {
		this.orderProviderPhone = orderProviderPhone;
	}

	@Column(name = "order_providerAddr")
	public String getOrderProviderAddr() {
		return this.orderProviderAddr;
	}

	public void setOrderProviderAddr(String orderProviderAddr) {
		this.orderProviderAddr = orderProviderAddr;
	}

	@Column(name = "order_createDate", length = 16)
	public String getOrderCreateDate() {
		return this.orderCreateDate;
	}

	public void setOrderCreateDate(String orderCreateDate) {
		this.orderCreateDate = orderCreateDate;
	}

	@Column(name = "order_state", length = 32)
	public String getOrderState() {
		return this.orderState;
	}

	public void setOrderState(String orderState) {
		this.orderState = orderState;
	}

	@Column(name = "goods_weight", precision = 22, scale = 0)
	public Double getGoodsWeight() {
		return this.goodsWeight;
	}

	public void setGoodsWeight(Double goodsWeight) {
		this.goodsWeight = goodsWeight;
	}

	@Column(name = "order_note")
	public String getOrderNote() {
		return this.orderNote;
	}

	public void setOrderNote(String orderNote) {
		this.orderNote = orderNote;
	}

	@Column(name = "order_freight", precision = 22, scale = 0)
	public Double getOrderFreight() {
		return this.orderFreight;
	}

	public void setOrderFreight(Double orderFreight) {
		this.orderFreight = orderFreight;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "uorder")
	public Set<Schedule> getSchedules() {
		return schedules;
	}

	public void setSchedules(Set<Schedule> schedules) {
		this.schedules = schedules;
	}

}
